<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="sf" uri="http://www.springframework.org/tags/form"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>济宁消防人员人员出入管理系统</title>
<link rel="stylesheet" href="themes/default/easyui.css" />
<link rel="stylesheet" href="themes/icon.css" />
<link rel="stylesheet" href="css/main.css" />
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="jquery.easyui.min.js"></script>
</head>
<body class="easyui-layout">
	<div id="content" data-options="region:'center'">
		<div class="ftitle">个人信息</div>
		<sf:form method="post" modelAttribute="user" id="user_update_pform">
			<table style="margin: 0 auto;">
				<tbody>
					<tr>
						<td>所属机构:</td>
						<td>${user.organization.name }</td>
					</tr>
					<tr>
						<td>真实姓名:</td>
						<td><sf:input path="realname" cssClass="easyui-validatebox"
								required="true" /></td>
					</tr>
					<tr>
						<td>手机号码:</td>
						<td><sf:input path="phone" cssClass="easyui-validatebox"
								required="true" /></td>
					</tr>
					<tr>
						<td><a href="javascript:updateUser();" class="easyui-linkbutton" data-options="iconCls:'icon-save'">保存</a>  
						</td>
					</tr>
				</tbody>
			</table>
		</sf:form>
		<script type="text/javascript">
			function updateUser(){
				var form = $('#user_update_pform').form('submit', {
					success : function(data) {
						data = $.parseJSON(data);
						if (data.success) {
							$('#tt').tabs('getTab','个人信息').panel('refresh');
							showMsg("操作成功。");
						} else {
							$.messager.alert('错误提示', data.message, 'error');
						}
					}

				});
			}
		</script>
	</div>
</body>
</html>
